package cn.dkk.behavior_design.visitor;

/**
 * @author dkk
 * @date 2022/7/31
 * @desc
 */
public class Test {
    public static void main(String[] args) {
        Home home = new Home();
        Cat cat = new Cat();
        Dog dog = new Dog();
        home.add(dog);
        home.add(cat);
        Other other = new Other();
        Owner owner = new Owner();
        home.visit(other);
        System.out.println("--------------");
        home.visit(owner);
    }
}
